#ifndef _CM_SHAREITEM_H
#define _CM_SHAREITEM_H

/******************************************************************************
** @file	cm_shareitem.h
** @author	Joel Chuca Condo
**
** @date	Sep 01, 2010
**
** @desc	This class allows the managment a set of WMI_Shere objects to 
**          save  and retrieve of the database
**          
**
******************************************************************************/

#include <wmi_reader.h>
#include "cm_scripts.h"
#include "sqlite3x.hpp"
#include <iostream>
#include "cm_common.h"

using namespace sqlite3x;

class CMEXPORT CM_ShareItem
{
public:

    /**
    * Default constructor
    */
    CM_ShareItem();
    
    /**
    * Destructor
    */
    ~CM_ShareItem();

    /**
    * Saves a collection of share objects of a computer in a instant of time 
    *
    * @param collectionId. The id of time to save a collection of results
    * @param shares. Is a collection of results of WIM_Share objects
    * @retun a integer value indicating the success of the process
    */
    int 
    saveShares(int collectionId, WMI_Result<WMI_Share>& shares);

    /**
    * Loads WMI_Share objects to a empty collection of results pertaining 
    * to a time instant
    *
    * @param collectionId. The id of a instant time
    * @param shares. Is a empty collection of results of WIM_Share objects
    * @retun a integer value indicating the success of the process
    */
    int 
    getShares(int collectionId, WMI_Result<WMI_Share>& shares);
};

#endif
